home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 7 / BBS in a Box - Macintosh - Volume VII (BBS in a Box) (January 1993).iso / Files / Hyper / T / TILEMIX.CPT / TileMix / card_3058.txt < prev    next >
Text File  |  1992-01-14  |  24KB  |  1,021 lines

  1. -- card: 3058 from stack: in
  2. -- bmap block id: 0
  3. -- flags: 0000
  4. -- background id: 2726
  5. -- name: 
  6. ----- HyperTalk script -----
  7. on opencard
  8.   clearboard
  9. end opencard
  10.  
  11.  
  12. on begin
  13.   set cursor to watch
  14.   randomboard
  15.   setboard
  16. end begin
  17.  
  18.  
  19. on imclicked
  20.   global gottile,gotcolors,gottilenum,map,score,hintpenalty,oldscore
  21.   if visible of btn "Begin" is true then exit imclicked
  22.   if gottile = "" then
  23.     put number of target into gottilenum
  24.     put short name of btn gottilenum into gotcolors
  25.     set name of btn gottilenum to ""
  26.     put rect of target into gottile
  27.     colorizehc "move",gottile,rect of btn "Spot"
  28.     colorizehc "colorfill",gottile,"0,0,0"
  29.     go to this cd
  30.     play click
  31.   else
  32.     get rect of target
  33.     if it ‚↠gottile then
  34.       colorizehc "move",it,gottile
  35.       colorizehc "colorfill",it,"0,0,0"
  36.       go to this cd
  37.       play click
  38.       set name of btn gottilenum to short name of btn (number of target)
  39.       set name of btn (number of target) to ""
  40.       add 1 to score
  41.       add hintpenalty to score
  42.     end if
  43.     colorizehc "move",rect of btn "Spot",it
  44.     colorizehc "colorfill",rect of btn "Spot","0,0,0"
  45.     go to this cd
  46.     play click
  47.     set name of btn (number of target) to gotcolors
  48.     put "" into gottile
  49.     flush
  50.   end if
  51.   if score > 999 then put "000" into score
  52.   get length(score)
  53.   if it = 1 then put "00" before score
  54.   else if it = 2 then put "0" before score
  55.   get length(oldscore)
  56.   if it = 1 then put "00" before oldscore
  57.   else if it = 2 then put "0" before oldscore
  58.   if score ‚↠oldscore then
  59.     repeat with a = 1 to 3
  60.       if char a of score ‚↠char a of oldscore
  61.       then colorizehc "add",("Digit"&char a of score),rect of btn ("Score"&a)
  62.     end repeat
  63.   end if
  64.   put score into oldscore
  65.   go to this cd
  66. end imclicked
  67.  
  68.  
  69. on clearboard
  70.   global gottile,map,boardsize,numcolors
  71.   if boardsize = "" then put 3 into boardsize
  72.   if numcolors = "" then put 10 into numcolors
  73.   put "" into gottile
  74.   put "" into map
  75.   set cursor to watch
  76.   colorizehc "colorfill",rect of this cd,"0,0,0"
  77.   colorizehc "add","SmallTitle",rect of btn "SmallTitle"
  78.   colorizehc "add","Begin1",rect of btn "Won"
  79.   colorizehc "add","Help",rect of btn "Help"
  80.   colorizehc "add","Tiles",rect of btn "Tiles"
  81.   drawtiles
  82.   colorizehc "add","Colors",rect of btn "Colors"
  83.   drawcolors
  84.   repeat with a = 1 to 3
  85.     colorizehc "add","Digit0",rect of btn ("Score"&a)
  86.   end repeat
  87.   go to this cd
  88.   show btn "Begin"
  89. end clearboard
  90.  
  91.  
  92. on setboard
  93.   global gottile,map,boardsize,score
  94.   put 0 into score
  95.   put "" into gottile
  96.   put "Black,White,Red,Blue,Yellow,Brown,Green,Purple,Orange,Grey" into colors
  97.   set cursor to watch
  98.   put "237,87,274,124" into mainrect
  99.   put "242,71,269,98"&return& "251,88,260,98"&return& "263,92,290,119"&return& "263,101,272,110"&return& "242,113,269,138"&return& "251,112,260,122"&return& "221,92,248,119"&return& "239,101,248,110" into allrects
  100.  
  101.   colorizehc "colorfill",rect of this cd,"0,0,0"
  102.   colorizehc "add","SmallTitle",rect of btn "SmallTitle"
  103.   colorizehc "add","Help",rect of btn "Help"
  104.   repeat with a = 1 to 3
  105.     colorizehc "add","Digit0",rect of btn ("Score"&a)
  106.   end repeat
  107.   colorizehc "add","Tiles",rect of btn "Tiles"
  108.   drawtiles
  109.   colorizehc "add","Colors",rect of btn "Colors"
  110.   drawcolors
  111.   colorizehc "add","Won1",rect of btn "Won"
  112.   colorizehc "add","Tile",mainrect
  113.  
  114.   repeat with c = 1 to boardsize
  115.     repeat with b = 1 to boardsize
  116.       put ((c-1)*5+b) into cb
  117.       put 1 into rectnum
  118.       put short name of btn cb into tilepat
  119.       repeat with a = 1 to 4
  120.         get (line rectnum of allrects)
  121.         colorizehc "add",item (item a of tilepat) of colors,item 1 to 2 of it,line rectnum+1 of allrects
  122.         add 2 to rectnum
  123.       end repeat
  124.       colorizehc "copy",mainrect,rect of btn cb
  125.     end repeat
  126.   end repeat
  127.   colorizehc "colorfill",mainrect,"0,0,0"
  128.   go to this cd
  129.   hide btn "Begin"
  130.   show btn "Won"
  131. end setboard
  132.  
  133.  
  134. on randomboard
  135.   global board,boardsize,numcolors,thesolution
  136.   colorizehc "colorfill",(topleft of btn 1 &","& bottomright of btn 25),"0,0,0"
  137.   colorizehc "colorfill","240,46,274,65","0,0,0"
  138.   colorizehc "colorfill","237,87,274,124","0,0,0"
  139.   colorizehc "colorfill",rect of btn "Spot","0,0,0"
  140.   colorizehc "add","Creating","51,74"
  141.   go to this cd
  142.   if boardsize = "" then put 3 into boardsize
  143.   if numcolors = "" then put 10 into numcolors
  144.   put "" into thebtns
  145.   put "" into alltiles
  146.   repeat with b = 1 to 5
  147.     repeat with a = 1 to 5
  148.       put ((b-1)*5+a) into ab
  149.       if a > boardsize or b > boardsize then hide btn ab else
  150.       show btn ab
  151.       put ab&"," after thebtns
  152.     end if
  153.     put return after alltiles
  154.   end repeat
  155. end repeat
  156. delete last char of thebtns
  157. repeat with b = 1 to boardsize
  158.   repeat with a = 1 to boardsize
  159.     put "" into map
  160.     put ((b-1)*5+a) into ab
  161.     if b = 1 then put ","&random(numcolors) after map
  162.     else put "," & item 3 of (line (ab-5) of alltiles) after map
  163.     put ","&random(numcolors) after map
  164.     put ","&random(numcolors) after map
  165.     if a = 1 then put ","&random(numcolors) after map
  166.     else put "," & item 2 of (line (ab-1) of alltiles) after map
  167.     delete first char of map
  168.     put map into line ab of alltiles
  169.     put random(number of items in thebtns) into rannum
  170.     put item rannum of thebtns into c
  171.     delete item rannum of thebtns
  172.     set name of btn c to map
  173.   end repeat
  174. end repeat
  175. delete last char of alltiles
  176. put alltiles into thesolution
  177. end randomboard
  178.  
  179.  
  180. on checkboard
  181.   global boardsize
  182.   set cursor to watch
  183.   repeat with b = 1 to boardsize
  184.     repeat with a = 1 to boardsize
  185.       if a=boardsize and b=boardsize then next repeat
  186.       put ((b-1)*5+a) into ab
  187.       put short name of btn ab into abname
  188.       if a < boardsize then
  189.         put short name of btn (ab+1) into ab1name
  190.         if item 2 of abname ‚↠item 4 of ab1name then
  191.           exit checkboard
  192.         end if
  193.       end if
  194.       if b < boardsize then
  195.         put short name of btn (ab+5) into ab5name
  196.         if item 3 of abname ‚↠item 1 of ab5name then
  197.           exit checkboard
  198.         end if
  199.       end if
  200.     end repeat
  201.   end repeat
  202.   play "Gong"
  203.   flash 6
  204.   colorizehc "add","Begin1",rect of btn "Won"
  205.   colorizehc "colorfill","15,16,191,192","0,0,0",blend
  206.   show btn "Begin"
  207.   go to this cd
  208. end checkboard
  209.  
  210.  
  211. on hint
  212.   global thesolution,boardsize,hintpenalty
  213.   if visible of btn "Begin" is true then exit to hypercard
  214.   repeat with b = boardsize down to 1
  215.     repeat with a = boardsize down to 1
  216.       put ((b-1)*5+a) into ab
  217.       if short name of btn ab ‚↠line ab of thesolution then exit repeat
  218.     end repeat
  219.     if short name of btn ab ‚↠line ab of thesolution then exit repeat
  220.   end repeat
  221.   put 4 into hintpenalty
  222.   send mousedown to btn (line ab of thesolution)
  223.   send mousedown to btn (ab)
  224.   put "" into hintpenalty
  225.   checkboard
  226.   if visible of btn "Begin" is true then exit to hypercard
  227. end hint
  228.  
  229.  
  230. on drawtiles
  231.   global boardsize
  232.   if boardsize = 5 then
  233.     colorizehc "add","Digit2",rect of btn "Tiles1"
  234.     colorizehc "add","Digit5",rect of btn "Tiles2"
  235.   else if boardsize = 4 then
  236.     colorizehc "add","Digit1",rect of btn "Tiles1"
  237.     colorizehc "add","Digit6",rect of btn "Tiles2"
  238.   else
  239.     colorizehc "colorfill",rect of btn "Tiles1","0,0,0"
  240.     colorizehc "add","Digit9",rect of btn "Tiles2"
  241.   end if
  242. end drawtiles
  243.  
  244.  
  245. on drawcolors
  246.   global numcolors
  247.   if numcolors = 10 then
  248.     colorizehc "add","ThinDigit1",rect of btn "Colors1"
  249.     colorizehc "add","Digit0",rect of btn "Colors2"
  250.   else
  251.     colorizehc "colorfill",rect of btn "Colors1","0,0,0"
  252.     colorizehc "add",("Digit"&numcolors),rect of btn "Colors2"
  253.   end if
  254. end drawcolors
  255.  
  256.  
  257. -- part 1 (button)
  258. -- low flags: 00
  259. -- high flags: 0000
  260. -- rect: left=15 top=16 right=53 bottom=52
  261. -- title width / last selected line: 0
  262. -- icon id / first selected line: 0 / 0
  263. -- text alignment: 1
  264. -- font id: 0
  265. -- text size: 12
  266. -- style flags: 0
  267. -- line height: 16
  268. -- part name: 3,9,7,3
  269. ----- HyperTalk script -----
  270. on mousedown
  271.   imclicked
  272. end mousedown
  273.  
  274.  
  275. -- part 3 (button)
  276. -- low flags: 00
  277. -- high flags: 0000
  278. -- rect: left=50 top=16 right=53 bottom=87
  279. -- title width / last selected line: 0
  280. -- icon id / first selected line: 0 / 0
  281. -- text alignment: 1
  282. -- font id: 0
  283. -- text size: 12
  284. -- style flags: 0
  285. -- line height: 16
  286. -- part name: 5,8,8,9
  287. ----- HyperTalk script -----
  288. on mousedown
  289.   imclicked
  290. end mousedown
  291.  
  292.  
  293. -- part 4 (button)
  294. -- low flags: 00
  295. -- high flags: 0000
  296. -- rect: left=85 top=16 right=53 bottom=122
  297. -- title width / last selected line: 0
  298. -- icon id / first selected line: 0 / 0
  299. -- text alignment: 1
  300. -- font id: 0
  301. -- text size: 12
  302. -- style flags: 0
  303. -- line height: 16
  304. -- part name: 6,4,7,8
  305. ----- HyperTalk script -----
  306. on mousedown
  307.   imclicked
  308. end mousedown
  309.  
  310.  
  311. -- part 5 (button)
  312. -- low flags: 80
  313. -- high flags: 0000
  314. -- rect: left=120 top=16 right=53 bottom=157
  315. -- title width / last selected line: 0
  316. -- icon id / first selected line: 0 / 0
  317. -- text alignment: 1
  318. -- font id: 0
  319. -- text size: 12
  320. -- style flags: 0
  321. -- line height: 16
  322. -- part name: 2,3,3,3
  323. ----- HyperTalk script -----
  324. on mousedown
  325.   imclicked
  326. end mousedown
  327.  
  328.  
  329. -- part 6 (button)
  330. -- low flags: 80
  331. -- high flags: 0000
  332. -- rect: left=155 top=16 right=53 bottom=192
  333. -- title width / last selected line: 0
  334. -- icon id / first selected line: 0 / 0
  335. -- text alignment: 1
  336. -- font id: 0
  337. -- text size: 12
  338. -- style flags: 0
  339. -- line height: 16
  340. -- part name: 4,3,7,5
  341. ----- HyperTalk script -----
  342. on mousedown
  343.   imclicked
  344. end mousedown
  345.  
  346.  
  347. -- part 7 (button)
  348. -- low flags: 00
  349. -- high flags: 0000
  350. -- rect: left=15 top=51 right=88 bottom=52
  351. -- title width / last selected line: 0
  352. -- icon id / first selected line: 0 / 0
  353. -- text alignment: 1
  354. -- font id: 0
  355. -- text size: 12
  356. -- style flags: 0
  357. -- line height: 16
  358. -- part name: 7,9,7,8
  359. ----- HyperTalk script -----
  360. on mousedown
  361.   imclicked
  362. end mousedown
  363.  
  364.  
  365. -- part 8 (button)
  366. -- low flags: 00
  367. -- high flags: 0000
  368. -- rect: left=50 top=51 right=88 bottom=87
  369. -- title width / last selected line: 0
  370. -- icon id / first selected line: 0 / 0
  371. -- text alignment: 1
  372. -- font id: 0
  373. -- text size: 12
  374. -- style flags: 0
  375. -- line height: 16
  376. -- part name: 8,9,1,9
  377. ----- HyperTalk script -----
  378. on mousedown
  379.   imclicked
  380. end mousedown
  381.  
  382.  
  383. -- part 9 (button)
  384. -- low flags: 00
  385. -- high flags: 0000
  386. -- rect: left=85 top=51 right=88 bottom=122
  387. -- title width / last selected line: 0
  388. -- icon id / first selected line: 0 / 0
  389. -- text alignment: 1
  390. -- font id: 0
  391. -- text size: 12
  392. -- style flags: 0
  393. -- line height: 16
  394. -- part name: 7,10,7,9
  395. ----- HyperTalk script -----
  396. on mousedown
  397.   imclicked
  398. end mousedown
  399.  
  400.  
  401. -- part 10 (button)
  402. -- low flags: 80
  403. -- high flags: 0000
  404. -- rect: left=120 top=51 right=88 bottom=157
  405. -- title width / last selected line: 0
  406. -- icon id / first selected line: 0 / 0
  407. -- text alignment: 1
  408. -- font id: 0
  409. -- text size: 12
  410. -- style flags: 0
  411. -- line height: 16
  412. -- part name: 3,5,4,1
  413. ----- HyperTalk script -----
  414. on mousedown
  415.   imclicked
  416. end mousedown
  417.  
  418.  
  419. -- part 11 (button)
  420. -- low flags: 80
  421. -- high flags: 0000
  422. -- rect: left=155 top=51 right=88 bottom=192
  423. -- title width / last selected line: 0
  424. -- icon id / first selected line: 0 / 0
  425. -- text alignment: 1
  426. -- font id: 0
  427. -- text size: 12
  428. -- style flags: 0
  429. -- line height: 16
  430. -- part name: 5,10,10,8
  431. ----- HyperTalk script -----
  432. on mousedown
  433.   imclicked
  434. end mousedown
  435.  
  436.  
  437. -- part 12 (button)
  438. -- low flags: 00
  439. -- high flags: 0000
  440. -- rect: left=15 top=86 right=123 bottom=52
  441. -- title width / last selected line: 0
  442. -- icon id / first selected line: 0 / 0
  443. -- text alignment: 1
  444. -- font id: 0
  445. -- text size: 12
  446. -- style flags: 0
  447. -- line height: 16
  448. -- part name: 7,7,7,10
  449. ----- HyperTalk script -----
  450. on mousedown
  451.   imclicked
  452. end mousedown
  453.  
  454.  
  455. -- part 13 (button)
  456. -- low flags: 00
  457. -- high flags: 0000
  458. -- rect: left=50 top=86 right=123 bottom=87
  459. -- title width / last selected line: 0
  460. -- icon id / first selected line: 0 / 0
  461. -- text alignment: 1
  462. -- font id: 0
  463. -- text size: 12
  464. -- style flags: 0
  465. -- line height: 16
  466. -- part name: 1,10,7,7
  467. ----- HyperTalk script -----
  468. on mousedown
  469.   imclicked
  470. end mousedown
  471.  
  472.  
  473. -- part 14 (button)
  474. -- low flags: 00
  475. -- high flags: 0000
  476. -- rect: left=85 top=86 right=123 bottom=122
  477. -- title width / last selected line: 0
  478. -- icon id / first selected line: 0 / 0
  479. -- text alignment: 1
  480. -- font id: 0
  481. -- text size: 12
  482. -- style flags: 0
  483. -- line height: 16
  484. -- part name: 7,1,1,10
  485. ----- HyperTalk script -----
  486. on mousedown
  487.   imclicked
  488. end mousedown
  489.  
  490.  
  491. -- part 15 (button)
  492. -- low flags: 80
  493. -- high flags: 0000
  494. -- rect: left=120 top=86 right=123 bottom=157
  495. -- title width / last selected line: 0
  496. -- icon id / first selected line: 0 / 0
  497. -- text alignment: 1
  498. -- font id: 0
  499. -- text size: 12
  500. -- style flags: 0
  501. -- line height: 16
  502. -- part name: 4,2,3,7
  503. ----- HyperTalk script -----
  504. on mousedown
  505.   imclicked
  506. end mousedown
  507.  
  508.  
  509. -- part 16 (button)
  510. -- low flags: 80
  511. -- high flags: 0000
  512. -- rect: left=155 top=86 right=123 bottom=192
  513. -- title width / last selected line: 0
  514. -- icon id / first selected line: 0 / 0
  515. -- text alignment: 1
  516. -- font id: 0
  517. -- text size: 12
  518. -- style flags: 0
  519. -- line height: 16
  520. -- part name: 8,9,2,6
  521. ----- HyperTalk script -----
  522. on mousedown
  523.   imclicked
  524. end mousedown
  525.  
  526.  
  527. -- part 17 (button)
  528. -- low flags: 80
  529. -- high flags: 0000
  530. -- rect: left=15 top=121 right=158 bottom=52
  531. -- title width / last selected line: 0
  532. -- icon id / first selected line: 0 / 0
  533. -- text alignment: 1
  534. -- font id: 0
  535. -- text size: 12
  536. -- style flags: 0
  537. -- line height: 16
  538. -- part name: 2,7,6,4
  539. ----- HyperTalk script -----
  540. on mousedown
  541.   imclicked
  542. end mousedown
  543.  
  544.  
  545. -- part 18 (button)
  546. -- low flags: 80
  547. -- high flags: 0000
  548. -- rect: left=50 top=121 right=158 bottom=87
  549. -- title width / last selected line: 0
  550. -- icon id / first selected line: 0 / 0
  551. -- text alignment: 1
  552. -- font id: 0
  553. -- text size: 12
  554. -- style flags: 0
  555. -- line height: 16
  556. -- part name: 1,5,6,7
  557. ----- HyperTalk script -----
  558. on mousedown
  559.   imclicked
  560. end mousedown
  561.  
  562.  
  563. -- part 19 (button)
  564. -- low flags: 80
  565. -- high flags: 0000
  566. -- rect: left=85 top=121 right=158 bottom=122
  567. -- title width / last selected line: 0
  568. -- icon id / first selected line: 0 / 0
  569. -- text alignment: 1
  570. -- font id: 0
  571. -- text size: 12
  572. -- style flags: 0
  573. -- line height: 16
  574. -- part name: 1,4,4,5
  575. ----- HyperTalk script -----
  576. on mousedown
  577.   imclicked
  578. end mousedown
  579.  
  580.  
  581. -- part 20 (button)
  582. -- low flags: 80
  583. -- high flags: 0000
  584. -- rect: left=120 top=121 right=158 bottom=157
  585. -- title width / last selected line: 0
  586. -- icon id / first selected line: 0 / 0
  587. -- text alignment: 1
  588. -- font id: 0
  589. -- text size: 12
  590. -- style flags: 0
  591. -- line height: 16
  592. -- part name: 3,1,2,4
  593. ----- HyperTalk script -----
  594. on mousedown
  595.   imclicked
  596. end mousedown
  597.  
  598.  
  599. -- part 21 (button)
  600. -- low flags: 80
  601. -- high flags: 0000
  602. -- rect: left=155 top=121 right=158 bottom=192
  603. -- title width / last selected line: 0
  604. -- icon id / first selected line: 0 / 0
  605. -- text alignment: 1
  606. -- font id: 0
  607. -- text size: 12
  608. -- style flags: 0
  609. -- line height: 16
  610. -- part name: 4,9,2,2
  611. ----- HyperTalk script -----
  612. on mousedown
  613.   imclicked
  614. end mousedown
  615.  
  616.  
  617. -- part 22 (button)
  618. -- low flags: 80
  619. -- high flags: 0000
  620. -- rect: left=15 top=156 right=193 bottom=52
  621. -- title width / last selected line: 0
  622. -- icon id / first selected line: 0 / 0
  623. -- text alignment: 1
  624. -- font id: 0
  625. -- text size: 12
  626. -- style flags: 0
  627. -- line height: 16
  628. -- part name: 9,10,4,3
  629. ----- HyperTalk script -----
  630. on mousedown
  631.   imclicked
  632. end mousedown
  633.  
  634.  
  635. -- part 23 (button)
  636. -- low flags: 80
  637. -- high flags: 0000
  638. -- rect: left=50 top=156 right=193 bottom=87
  639. -- title width / last selected line: 0
  640. -- icon id / first selected line: 0 / 0
  641. -- text alignment: 1
  642. -- font id: 0
  643. -- text size: 12
  644. -- style flags: 0
  645. -- line height: 16
  646. -- part name: 10,1,6,3
  647. ----- HyperTalk script -----
  648. on mousedown
  649.   imclicked
  650. end mousedown
  651.  
  652.  
  653. -- part 24 (button)
  654. -- low flags: 80
  655. -- high flags: 0000
  656. -- rect: left=85 top=156 right=193 bottom=122
  657. -- title width / last selected line: 0
  658. -- icon id / first selected line: 0 / 0
  659. -- text alignment: 1
  660. -- font id: 0
  661. -- text size: 12
  662. -- style flags: 0
  663. -- line height: 16
  664. -- part name: 1,9,4,10
  665. ----- HyperTalk script -----
  666. on mousedown
  667.   imclicked
  668. end mousedown
  669.  
  670.  
  671. -- part 25 (button)
  672. -- low flags: 80
  673. -- high flags: 0000
  674. -- rect: left=120 top=156 right=193 bottom=157
  675. -- title width / last selected line: 0
  676. -- icon id / first selected line: 0 / 0
  677. -- text alignment: 1
  678. -- font id: 0
  679. -- text size: 12
  680. -- style flags: 0
  681. -- line height: 16
  682. -- part name: 4,1,4,1
  683. ----- HyperTalk script -----
  684. on mousedown
  685.   imclicked
  686. end mousedown
  687.  
  688.  
  689. -- part 26 (button)
  690. -- low flags: 80
  691. -- high flags: 0000
  692. -- rect: left=155 top=156 right=193 bottom=192
  693. -- title width / last selected line: 0
  694. -- icon id / first selected line: 0 / 0
  695. -- text alignment: 1
  696. -- font id: 0
  697. -- text size: 12
  698. -- style flags: 0
  699. -- line height: 16
  700. -- part name: 9,8,8,3
  701. ----- HyperTalk script -----
  702. on mousedown
  703.   imclicked
  704. end mousedown
  705.  
  706.  
  707. -- part 40 (button)
  708. -- low flags: 00
  709. -- high flags: 0000
  710. -- rect: left=239 top=86 right=123 bottom=276
  711. -- title width / last selected line: 0
  712. -- icon id / first selected line: 0 / 0
  713. -- text alignment: 1
  714. -- font id: 0
  715. -- text size: 12
  716. -- style flags: 0
  717. -- line height: 16
  718. -- part name: Spot
  719. ----- HyperTalk script -----
  720. on mousedown
  721.   global gottilenum,gottile
  722.   if gottile ‚↠"" then send mousedown to btn gottilenum
  723. end mousedown
  724.  
  725.  
  726. -- part 41 (button)
  727. -- low flags: 00
  728. -- high flags: 0000
  729. -- rect: left=217 top=162 right=185 bottom=296
  730. -- title width / last selected line: 0
  731. -- icon id / first selected line: 0 / 0
  732. -- text alignment: 1
  733. -- font id: 0
  734. -- text size: 12
  735. -- style flags: 0
  736. -- line height: 16
  737. -- part name: Won
  738. ----- HyperTalk script -----
  739. on mousedown
  740.   global gottile
  741.   colorizehc "add","Won2",rect of me
  742.   hide me
  743.   if gottile ‚↠"" then send mousedown to btn "Spot"
  744.   checkboard
  745.   if visible of btn "Begin" is false then
  746.     colorizehc "add","Won1",rect of me
  747.     answer "You have NOT solved the puzzle yet..." with "New Game" or "Continue"
  748.     if it = "New Game" then
  749.       show btn "Begin"
  750.       colorizehc "colorfill","15,16,191,192","0,0,0",blend
  751.       go to this cd
  752.       send mousedown to btn begin
  753.     end if
  754.   end if
  755.   show me
  756. end mousedown
  757.  
  758.  
  759. -- part 42 (button)
  760. -- low flags: 00
  761. -- high flags: 0000
  762. -- rect: left=205 top=21 right=43 bottom=309
  763. -- title width / last selected line: 0
  764. -- icon id / first selected line: 0 / 0
  765. -- text alignment: 1
  766. -- font id: 0
  767. -- text size: 12
  768. -- style flags: 0
  769. -- line height: 16
  770. -- part name: SmallTitle
  771. ----- HyperTalk script -----
  772. on mousedown
  773.   if visible of btn "Begin" is false then
  774.     answer "Quit this game and go back to the title page?" with "Ok" or "Cancel"
  775.     if it = "Cancel" then exit mousedown
  776.   end if
  777.   go to card 1
  778.   openstack
  779. end mousedown
  780.  
  781.  
  782. -- part 43 (button)
  783. -- low flags: 00
  784. -- high flags: 0000
  785. -- rect: left=217 top=162 right=185 bottom=296
  786. -- title width / last selected line: 0
  787. -- icon id / first selected line: 0 / 0
  788. -- text alignment: 1
  789. -- font id: 0
  790. -- text size: 12
  791. -- style flags: 0
  792. -- line height: 16
  793. -- part name: Begin
  794. ----- HyperTalk script -----
  795. on mousedown
  796.   colorizehc "add","Begin2",rect of me
  797.   hide me
  798.   begin
  799.   colorizehc "add","Won1",rect of me
  800. end mousedown
  801.  
  802.  
  803. -- part 44 (button)
  804. -- low flags: 00
  805. -- high flags: 0000
  806. -- rect: left=217 top=139 right=158 bottom=229
  807. -- title width / last selected line: 0
  808. -- icon id / first selected line: 0 / 0
  809. -- text alignment: 1
  810. -- font id: 0
  811. -- text size: 12
  812. -- style flags: 0
  813. -- line height: 16
  814. -- part name: Tiles1
  815.  
  816.  
  817. -- part 45 (button)
  818. -- low flags: 00
  819. -- high flags: 0000
  820. -- rect: left=228 top=139 right=158 bottom=240
  821. -- title width / last selected line: 0
  822. -- icon id / first selected line: 0 / 0
  823. -- text alignment: 1
  824. -- font id: 0
  825. -- text size: 12
  826. -- style flags: 0
  827. -- line height: 16
  828. -- part name: Tiles2
  829.  
  830.  
  831. -- part 47 (button)
  832. -- low flags: 00
  833. -- high flags: 0000
  834. -- rect: left=241 top=140 right=157 bottom=258
  835. -- title width / last selected line: 0
  836. -- icon id / first selected line: 0 / 0
  837. -- text alignment: 1
  838. -- font id: 0
  839. -- text size: 12
  840. -- style flags: 0
  841. -- line height: 16
  842. -- part name: Tiles
  843.  
  844.  
  845. -- part 48 (button)
  846. -- low flags: 00
  847. -- high flags: 0000
  848. -- rect: left=264 top=139 right=158 bottom=269
  849. -- title width / last selected line: 0
  850. -- icon id / first selected line: 0 / 0
  851. -- text alignment: 1
  852. -- font id: 0
  853. -- text size: 12
  854. -- style flags: 0
  855. -- line height: 16
  856. -- part name: Colors1
  857.  
  858.  
  859. -- part 49 (button)
  860. -- low flags: 00
  861. -- high flags: 0000
  862. -- rect: left=268 top=139 right=158 bottom=280
  863. -- title width / last selected line: 0
  864. -- icon id / first selected line: 0 / 0
  865. -- text alignment: 1
  866. -- font id: 0
  867. -- text size: 12
  868. -- style flags: 0
  869. -- line height: 16
  870. -- part name: Colors2
  871.  
  872.  
  873. -- part 50 (button)
  874. -- low flags: 00
  875. -- high flags: 0000
  876. -- rect: left=280 top=140 right=157 bottom=295
  877. -- title width / last selected line: 0
  878. -- icon id / first selected line: 0 / 0
  879. -- text alignment: 1
  880. -- font id: 0
  881. -- text size: 12
  882. -- style flags: 0
  883. -- line height: 16
  884. -- part name: Colors
  885.  
  886.  
  887. -- part 52 (button)
  888. -- low flags: 00
  889. -- high flags: 0000
  890. -- rect: left=205 top=46 right=65 bottom=217
  891. -- title width / last selected line: 0
  892. -- icon id / first selected line: 0 / 0
  893. -- text alignment: 1
  894. -- font id: 0
  895. -- text size: 12
  896. -- style flags: 0
  897. -- line height: 16
  898. -- part name: Score1
  899. ----- HyperTalk script -----
  900. on mousedown
  901.   hint
  902. end mousedown
  903.  
  904.  
  905. -- part 53 (button)
  906. -- low flags: 00
  907. -- high flags: 0000
  908. -- rect: left=216 top=46 right=65 bottom=228
  909. -- title width / last selected line: 0
  910. -- icon id / first selected line: 0 / 0
  911. -- text alignment: 1
  912. -- font id: 0
  913. -- text size: 12
  914. -- style flags: 0
  915. -- line height: 16
  916. -- part name: Score2
  917. ----- HyperTalk script -----
  918. on mousedown
  919.   hint
  920. end mousedown
  921.  
  922.  
  923. -- part 54 (button)
  924. -- low flags: 00
  925. -- high flags: 0000
  926. -- rect: left=227 top=46 right=65 bottom=239
  927. -- title width / last selected line: 0
  928. -- icon id / first selected line: 0 / 0
  929. -- text alignment: 1
  930. -- font id: 0
  931. -- text size: 12
  932. -- style flags: 0
  933. -- line height: 16
  934. -- part name: Score3
  935. ----- HyperTalk script -----
  936. on mousedown
  937.   hint
  938. end mousedown
  939.  
  940.  
  941. -- part 56 (button)
  942. -- low flags: 00
  943. -- high flags: 0000
  944. -- rect: left=215 top=137 right=159 bottom=260
  945. -- title width / last selected line: 0
  946. -- icon id / first selected line: 0 / 0
  947. -- text alignment: 1
  948. -- font id: 0
  949. -- text size: 12
  950. -- style flags: 0
  951. -- line height: 16
  952. -- part name: 
  953. ----- HyperTalk script -----
  954. on mousedown
  955.   global boardsize
  956.   if visible of btn "Begin" is false then
  957.     answer "You must end this game with the 'Have I Won' button before you can change the settings."
  958.     exit mousedown
  959.   end if
  960.   add 1 to boardsize
  961.   if boardsize > 5 then put 3 into boardsize
  962.   drawtiles
  963.   go to this cd
  964. end mousedown
  965.  
  966.  
  967. -- part 57 (button)
  968. -- low flags: 00
  969. -- high flags: 0000
  970. -- rect: left=263 top=137 right=159 bottom=297
  971. -- title width / last selected line: 0
  972. -- icon id / first selected line: 0 / 0
  973. -- text alignment: 1
  974. -- font id: 0
  975. -- text size: 12
  976. -- style flags: 0
  977. -- line height: 16
  978. -- part name: 
  979. ----- HyperTalk script -----
  980. on mousedown
  981.   global numcolors
  982.   if visible of btn "Begin" is false then
  983.     answer "You must end this game with the 'Have I Won' button before you can change the settings."
  984.     exit mousedown
  985.   end if
  986.   add -1 to numcolors
  987.   if numcolors < 3 then put 10 into numcolors
  988.   drawcolors
  989.   go to this cd
  990. end mousedown
  991.  
  992.  
  993. -- part 58 (button)
  994. -- low flags: 00
  995. -- high flags: 0000
  996. -- rect: left=293 top=44 right=65 bottom=309
  997. -- title width / last selected line: 0
  998. -- icon id / first selected line: 0 / 0
  999. -- text alignment: 1
  1000. -- font id: 0
  1001. -- text size: 12
  1002. -- style flags: 0
  1003. -- line height: 16
  1004. -- part name: Help
  1005. ----- HyperTalk script -----
  1006. on mousedown
  1007.   set cursor to watch
  1008.   colorizehc "add","Help2",rect of me
  1009.   hide me
  1010.   if visible of btn "Begin" is false then
  1011.     answer "Quit this game and go the help pages?" with "Ok" or "Cancel"
  1012.     if it = "Cancel" then
  1013.       colorizehc "add","Help",rect of me
  1014.       show me
  1015.       exit mousedown
  1016.     end if
  1017.   end if
  1018.   show me
  1019.   go to cd "Help"
  1020. end mousedown
  1021.